package com.yonyou.cyxdms.sysAuth.service.entity.gathering;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;

/**
 * <p>
 *
 * </p>
 *
 * @author adu
 * @since 2019-11-04
 */
@TableName("tm_gathering_type")
public class GatheringTypePO extends DMSBasePO<GatheringTypePO> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "GATHERING_ID", type = IdType.AUTO)
    private Long gatheringId;
    @TableField("COMPANY_ID")
    private Long companyId;
    @TableField("APP_ID")
    private String appId;
    /**
     * 登录公司
     */
    @TableField("OWNER_CODE")
    private String ownerCode;
    /**
     * 编号
     */
    @TableField("GATHERING_CODE")
    private String gatheringCode;
    /**
     * 名称
     */
    @TableField("GATHERING_NAME")
    private String gatheringName;
    /**
     * 1045
     */
    @TableField("DATA_SOURCE")
    private Integer dataSource;
    /**
     * 1046
     */
    @TableField("DATA_TYPE")
    private Integer dataType;
    /**
     * 收款是否自动核销
     */
    @TableField("WRITEOFF_TAG")
    private Integer writeoffTag;
    /**
     * 是否有效
     */
    @TableField("VALID_STATUS")
    private Integer validStatus;
    /**
     * 是否收款
     */
    @TableField("IS_RECEIVE")
    private Integer isReceive;
    /**
     * 是否付款
     */
    @TableField("IS_PAY")
    private Integer isPay;
    /**
     * 逻辑删除标志：是否删除
     */
    @TableField("IS_DELETED")
    @Version
    @TableLogic
    private Boolean isDeleted;

    public GatheringTypePO() {
        super();
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public Long getGatheringId() {
        return gatheringId;
    }

    public void setGatheringId(Long gatheringId) {
        this.gatheringId = gatheringId;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public String getOwnerCode() {
        return ownerCode;
    }

    public void setOwnerCode(String ownerCode) {
        this.ownerCode = ownerCode;
    }

    public String getGatheringCode() {
        return gatheringCode;
    }

    public void setGatheringCode(String gatheringCode) {
        this.gatheringCode = gatheringCode;
    }

    public String getGatheringName() {
        return gatheringName;
    }

    public void setGatheringName(String gatheringName) {
        this.gatheringName = gatheringName;
    }

    public Integer getDataSource() {
        return dataSource;
    }

    public void setDataSource(Integer dataSource) {
        this.dataSource = dataSource;
    }

    public Integer getDataType() {
        return dataType;
    }

    public void setDataType(Integer dataType) {
        this.dataType = dataType;
    }

    public Integer getWriteoffTag() {
        return writeoffTag;
    }

    public void setWriteoffTag(Integer writeoffTag) {
        this.writeoffTag = writeoffTag;
    }

    public Integer getValidStatus() {
        return validStatus;
    }

    public void setValidStatus(Integer validStatus) {
        this.validStatus = validStatus;
    }

    public Integer getIsReceive() {
        return isReceive;
    }

    public void setIsReceive(Integer isReceive) {
        this.isReceive = isReceive;
    }

    public Integer getIsPay() {
        return isPay;
    }

    public void setIsPay(Integer isPay) {
        this.isPay = isPay;
    }

    public Boolean getDeleted() {
        return isDeleted;
    }

    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    protected Serializable pkVal() {
        return this.gatheringId;
    }

    @Override
    public String toString() {
        return "GatheringTypePO{" +
                "gatheringId=" + gatheringId +
                ", companyId=" + companyId +
                ", ownerCode=" + ownerCode +
                ", gatheringCode=" + gatheringCode +
                ", gatheringName=" + gatheringName +
                ", dataSource=" + dataSource +
                ", dataType=" + dataType +
                ", writeoffTag=" + writeoffTag +
                ", validStatus=" + validStatus +
                ", isReceive=" + isReceive +
                ", isPay=" + isPay +
                ", isDeleted=" + isDeleted +
                "}";
    }


    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author adu
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "gatheringId");
    }


}
